import request from "@/utils/requset";

export default {
  // 获取首页推荐数据
  getHomePages(){
    return request.get<any,any>(
      `/xhr/index.json?__timestamp=1630131808529`
    )
  },
  // 为你推荐和分类列表的数据
  getCategory1() {
    return request.get<any, any>(
      `/item/cateList.json?__timestamp=1630131286110&categoryId=`
    );
  },
  // 根据分类id获取分类的列表
  getCategory2(categoryId: any) {
    return request.get<any, any>(
      `/item/cateList.json?__timestamp=1630131455012&categoryId=${categoryId}`
    );
  },
  // 获取某个分类下的商品列表
  getCategory3(subCategoryId: any, categoryId: any) {
    return request.get<any, any>(
      `/item/cateList.json?__timestamp=1630133942864&categoryType=0&subCategoryId=${subCategoryId}&categoryId=${categoryId}`
    );
  },
};
